<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ include file="../../head/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<script type="text/javascript"
		src="<%=path%>/resource/js/jquery/1.6.2/jquery-1.6.2.min.js">
	</script>
	<script type="text/javascript"
		src="<%=path%>/resource/js/jquery-easyui-1.3.3/jquery.cookie.js">
	</script>
	<link id="easyuiTheme" rel="stylesheet" type="text/css"
			href="<%=path%>/resource/js/jquery-easyui-1.3.3/themes/theme.css"></link>
	
	<link rel="stylesheet" type="text/css"
		href="<%=path%>/resource/js/jquery-easyui-1.3.3/themes/icon.css"></link>
	<script type="text/javascript"
		src="<%=path%>/resource/js/jquery-easyui-1.3.3/jquery.easyui.min.js">
	</script>
	<script type="text/javascript" charset="UTF-8"
		src="<%=path%>/resource/js/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js">
	</script>
	<!-- 本身.JS -->
	<script type="text/javascript" src="<%=path%>/page/systemManage/sysUser/sys_user.js"> </script>
	<script type="text/javascript"
			src="<%=path%>/resource/js/jstree/v_1_0rc2/jquery.jstree.js">
	</script>	
	<script type="text/javascript"
			src="<%=path%>/js/jquery/jquery.form.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			//总面板的宽和高
			//$("#cc").css("width", $(window).width() - 24);
			$("#cc").css("height", $(window).height() - 20);
			//$("#c").css("width", $(window).width() - 	28);
			$("#c").css("height", $(window).height() - 	50);
		});
	</script>
</head>
<body style="OVERFLOW: hidden;">
	<!-- 总面板开始 -->
	<div id="cc" class="easyui-layout">
		<div id="c" data-options="region:'center',title:'人员管理'" style="OVERFLOW: hidden;">
			<!-- 按钮和查询栏开始 -->
			<div id="tb" style="padding:5px;height:auto;">
				<!-- 按钮区开始 -->
				<div style="margin-bottom:5px">
					<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="openAdd();">新增</a>
					<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="openUpdate();">修改</a>
					<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="doDelete();">删除</a>
					<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" onclick="resetPassword();">恢复密码设置</a>
				</div>
				<!-- 按钮区结束 -->
				<!-- 查询区开始 -->
				<form id="searchForm">
					<div>
						<input type="hidden" id="currentUserId" name="currentUserId"
								value="${sessionScope.loginUser.id }" />
						姓名：<input type="text" name="sysUserBean.realName"  style="width:90px"/>
						身份证号：<input type="text" name="sysUserBean.identityCard"  style="width:90px"/>
						用户名：<input type="text" name="sysUserBean.userName"  style="width:90px"/>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'" id="searchButton">查询</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" onclick="document.forms[0].reset();">刷新</a>
					</div>
				</form>
				<!-- 查询区结束 -->
			</div>
			<!-- 按钮和查询栏结束 -->
			<!-- 列表开始 -->
			<table id="sysUserList"></table>
			<!-- 列表结束 -->
		</div>
	</div>
	<!-- 总面板结束 -->
	
	<!-- 新增修改界面开始 -->
	<div id="mydialog" class="easyui-dialog"
			style="width: 614px; height: 258px;"
			data-options="title:'新增',modal:true,closed:true">
	    <form method="post" id="sysUserForm">
			<table style="width: 99%;height: 99%; text-align:center;" border="0">
				<tr>
					<td width="20%"><span style="color: red">*</span>姓名：</td>
					<td width="30%" align="left">
						<input type="hidden" id='opsName' name='sysUserBean.opsName' />
						<input class="easyui-validatebox" name="sysUserBean.realName" id="realName" 
						 data-options="required:true" />
						<input type="hidden" name="sysUserBean.id" id='id' />
					</td>
					<td width="20%"><span style="color: red">*</span>用户名：</td>
					<td width="30%" align="left">
						<input class="easyui-validatebox" type="text" name="sysUserBean.userName" validtype="length[3,12]"
						id="userName" data-options="required:true" />
					</td>
				</tr>
				<tr>
					<td><span style="color: red">*</span>用户密码：</td>
					<td align="left">
						<input class="easyui-validatebox" type="password" name="sysUserBean.password" 
						id="password" data-options="required:true"/>
					</td>
					<td><span style="color: red">*</span>所属物业公司</td>
					<td align="left">
						<input type="hidden" name="sysUserBean.wyId" id="wyId" />
						<input type="text" name="sysUserBean.enterpriseName" class="easyui-validatebox" data-options="required:true" 
							id="companyName" readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<td>身份证号：</td>
					<td align="left">
						<input type="text" name="sysUserBean.identityCard"
								id="identityCard"  maxlength="18" />
					</td>
					<td>手机号码：</td>
					<td align="left">
						<input type="text" name="sysUserBean.mobile" id="mobile" />
					</td>
				</tr>
				<tr>
					<td>分配组织机构：</td>
					<td align="left">
						<input type="hidden" name="sysUserBean.sysOrganizationIDs"
							id="sysOrganizationIDs" size="80" readonly="readonly"></input>
						<textarea name="sysUserBean.orgNames" id="orgNames" rows='4'
							cols='19' readonly="readonly"></textarea>
					</td>
					<td>分配角色：</td>
					<td align="left">
						<input type="hidden" name="sysUserBean.sysRoleIDs"
								id="sysRoleIDs" size="80" readonly="readonly"></input>
						<textarea name="sysUserBean.roleName" id="roleName" rows='4'
								cols='19' readonly="readonly"></textarea>
					</td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="4" align="right">
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" onclick="resetOrgs();">清空组织</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" onclick="resetAuth();">清空角色</a>
						<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="submitForm();">保存</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-reload'" onclick="resetForm();" id="reFlash">刷新</a>
						<a href="#" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-cancel'" onclick="closeDialog();">关闭</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<!-- 新增修改界面结束 -->
	<!-- 组织机构选择开始 -->
	<div id="organizationSelect" class="easyui-dialog"
			style="width: 210px; height: 300px;"
			data-options="title:'选择组织机构',modal:true,closed:true">
			<div id="west" data-options="region:'west',collapsible:false,title:'组织机构树'" style="width:170px;height: 230px;">
				<div id="sysOrganizationTree"></div>
			</div>
	</div>
	<!-- 组织机构选择结束 -->
	<!-- 角色权限选择开始 -->
	<div id="sysRoleSelect" class="easyui-dialog"
			style="width: 410px; height: 300px;"
			data-options="title:'选择角色权限',modal:true,closed:true">
			<div id="west" data-options="region:'west',collapsible:false,title:''" style="width:170px;height: 230px;">
				<div id="sysRoleList"></div>
			</div>
	</div>
	<!-- 角色权限选择结束 -->
	<!-- 物业公司选择开始 -->
	<div id="sysCompanySelect" class="easyui-dialog"
			style="width: 410px; height: 300px;"
			data-options="title:'选择物业公司',modal:true,closed:true">
			<div id="west" data-options="region:'west',collapsible:false,title:''" style="width:170px;height: 230px;">
				<div id="sysCompanyList"></div>
			</div>
	</div>
	<!-- 物业公司选择开始 -->
</body>
</html>